<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>WingPick Pro - 发动机配置</title>
    <!-- Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- FontAwesome -->
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- 自定义配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#1976D2',
                        'primary-variant': '#0D47A1',
                        secondary: '#FF6F00',
                        'secondary-variant': '#E65100',
                        background: '#F5F5F5',
                        surface: '#FFFFFF',
                        'on-surface': '#212121',
                        'on-surface-variant': '#757575',
                        border: '#E0E0E0',
                        success: '#4CAF50',
                        warning: '#FFC107',
                        error: '#F44336',
                        info: '#2196F3'
                    }
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .android-card {
                @apply bg-surface rounded-2xl shadow-sm p-4;
            }
            .android-button {
                @apply bg-primary text-white py-3 px-6 rounded-lg font-medium transition-all duration-200 active:scale-95;
            }
            .android-button-secondary {
                @apply bg-white text-primary border border-primary py-3 px-6 rounded-lg font-medium transition-all duration-200 active:scale-95;
            }
            .section-title {
                @apply text-xl font-semibold text-on-surface mb-3;
            }
            .radio-input {
                @apply w-5 h-5 rounded-full border-2 border-primary flex items-center justify-center cursor-pointer transition-all;
            }
            .radio-input-checked {
                @apply bg-primary;
            }
            .radio-input-checked::after {
                content: '';
                @apply w-2.5 h-2.5 rounded-full bg-white;
            }
            .step-indicator {
                @apply h-1 rounded-full flex-1 transition-all duration-300;
            }
            .step-indicator-active {
                @apply bg-primary;
            }
            .step-indicator-inactive {
                @apply bg-border;
            }
            .step-indicator-completed {
                @apply bg-primary;
            }
        }
    </style>
</head>
<body class="bg-background font-roboto text-on-surface min-h-screen">
    <!-- Android 状态栏 -->
    <div class="bg-primary h-7 w-full flex items-center justify-between px-4">
        <div class="text-white text-xs">18:30</div>
        <div class="flex items-center space-x-1">
            <i class="fa fa-signal text-white text-xs"></i>
            <i class="fa fa-wifi text-white text-xs"></i>
            <i class="fa fa-battery-three-quarters text-white text-xs"></i>
        </div>
    </div>

    <!-- 顶部导航栏 -->
    <header class="bg-primary text-white shadow-md">
        <div class="flex items-center h-14 px-4">
            <button id="backButton" class="mr-4">
                <i class="fa fa-arrow-left text-lg"></i>
            </button>
            <div class="text-lg font-semibold flex-1 text-center mr-4">配置报价</div>
        </div>
    </header>

    <!-- 步骤指示器 -->
    <div class="px-4 pt-4 pb-2">
        <div class="flex items-center justify-between mb-1">
            <span class="text-xs font-medium text-primary">1/4</span>
            <span class="text-xs font-medium text-on-surface-variant">发动机配置</span>
        </div>
        <div class="flex items-center space-x-2">
            <div class="step-indicator step-indicator-active"></div>
            <div class="step-indicator step-indicator-inactive"></div>
            <div class="step-indicator step-indicator-inactive"></div>
            <div class="step-indicator step-indicator-inactive"></div>
        </div>
    </div>

    <!-- 产品信息 -->
    <div class="px-4 pb-4">
        <div class="android-card">
            <div class="flex items-center">
                <div class="w-16 h-16 rounded-lg overflow-hidden flex-shrink-0">
                    <img src="../../WingPick Pro/static/AC311A.png" alt="AC311A直升机" class="w-full h-full object-cover">
                </div>
                <div class="ml-3 flex-1">
                    <h2 class="font-semibold">AC311A</h2>
                    <p class="text-on-surface-variant text-sm">轻型多用途直升机</p>
                    <p class="text-primary font-medium">¥12,500,000</p>
                </div>
            </div>
        </div>
    </div>

    <!-- 主内容区 -->
    <main class="p-4 space-y-4 pb-24">
        <h1 class="text-xl font-bold mb-4">选择发动机</h1>
        
        <!-- 发动机选项 1 -->
        <div class="android-card border-2 border-transparent hover:border-primary/30 transition-all cursor-pointer engine-option" data-price="12500000">
            <div class="flex items-start">
                <div class="radio-input radio-input-checked mt-1 mr-3 flex-shrink-0"></div>
                <div class="flex-1">
                    <div class="flex justify-between items-center mb-1">
                        <h3 class="font-semibold">标准发动机</h3>
                        <p class="font-medium text-primary">¥12,500,000</p>
                    </div>
                    <p class="text-on-surface-variant text-sm mb-2">Honeywell HTS900 涡轴发动机</p>
                    <div class="grid grid-cols-2 gap-2 text-xs">
                        <div class="flex items-center">
                            <i class="fa fa-bolt text-on-surface-variant mr-1"></i>
                            <span>功率: 550千瓦</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-tachometer text-on-surface-variant mr-1"></i>
                            <span>最大速度: 258km/h</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-clock-o text-on-surface-variant mr-1"></i>
                            <span>大修间隔: 3000小时</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-leaf text-on-surface-variant mr-1"></i>
                            <span>燃油效率: 标准</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 发动机选项 2 -->
        <div class="android-card border-2 border-transparent hover:border-primary/30 transition-all cursor-pointer engine-option" data-price="13800000">
            <div class="flex items-start">
                <div class="radio-input mt-1 mr-3 flex-shrink-0"></div>
                <div class="flex-1">
                    <div class="flex justify-between items-center mb-1">
                        <h3 class="font-semibold">高性能发动机</h3>
                        <p class="font-medium text-primary">¥13,800,000</p>
                    </div>
                    <p class="text-on-surface-variant text-sm mb-2">Pratt & Whitney PW206B3 涡轴发动机</p>
                    <div class="grid grid-cols-2 gap-2 text-xs">
                        <div class="flex items-center">
                            <i class="fa fa-bolt text-on-surface-variant mr-1"></i>
                            <span>功率: 630千瓦</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-tachometer text-on-surface-variant mr-1"></i>
                            <span>最大速度: 275km/h</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-clock-o text-on-surface-variant mr-1"></i>
                            <span>大修间隔: 3500小时</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-leaf text-on-surface-variant mr-1"></i>
                            <span>燃油效率: 优秀</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 发动机选项 3 -->
        <div class="android-card border-2 border-transparent hover:border-primary/30 transition-all cursor-pointer engine-option" data-price="14500000">
            <div class="flex items-start">
                <div class="radio-input mt-1 mr-3 flex-shrink-0"></div>
                <div class="flex-1">
                    <div class="flex justify-between items-center mb-1">
                        <h3 class="font-semibold">高原增强型发动机</h3>
                        <p class="font-medium text-primary">¥14,500,000</p>
                    </div>
                    <p class="text-on-surface-variant text-sm mb-2">Arriel 2D 涡轴发动机（高海拔优化）</p>
                    <div class="grid grid-cols-2 gap-2 text-xs">
                        <div class="flex items-center">
                            <i class="fa fa-bolt text-on-surface-variant mr-1"></i>
                            <span>功率: 610千瓦</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-tachometer text-on-surface-variant mr-1"></i>
                            <span>最大速度: 265km/h</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-clock-o text-on-surface-variant mr-1"></i>
                            <span>大修间隔: 3200小时</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa fa-mountain text-on-surface-variant mr-1"></i>
                            <span>高原性能: 卓越</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 底部操作按钮 -->
        <div class="fixed bottom-0 left-0 right-0 bg-surface p-4 border-t border-border">
            <div class="flex justify-between items-center mb-3">
                <span class="text-sm text-on-surface-variant">当前选择价格:</span>
                <span id="currentPrice" class="text-xl font-semibold text-primary">¥12,500,000</span>
            </div>
            <button id="nextButton" class="android-button w-full">
                下一步: 内饰配置
            </button>
        </div>
    </main>

    <script>
        // 返回按钮点击事件
        document.getElementById('backButton').addEventListener('click', function() {
            window.history.back();
        });

        // 发动机选项点击事件
        const engineOptions = document.querySelectorAll('.engine-option');
        const radioInputs = document.querySelectorAll('.radio-input');
        const currentPriceElement = document.getElementById('currentPrice');

        engineOptions.forEach((option, index) => {
            option.addEventListener('click', function() {
                // 移除所有选中状态
                radioInputs.forEach(input => {
                    input.classList.remove('radio-input-checked');
                });
                // 设置当前选项为选中状态
                radioInputs[index].classList.add('radio-input-checked');
                
                // 更新价格显示
                const price = option.getAttribute('data-price');
                const formattedPrice = new Intl.NumberFormat('zh-CN').format(price);
                currentPriceElement.textContent = `¥${formattedPrice}`;
            });
        });

        // 下一步按钮点击事件
        document.getElementById('nextButton').addEventListener('click', function() {
            // 跳转到内饰配置页面
            window.location.href = 'config-interior.html';
        });
    </script>
</body>
</html>